/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 50px;
}

/* 标题样式 */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #34495e;
    margin: 20px 0 15px 0;
    font-size: 1.5em;
}

/* 表单样式 */
form {
    margin: 20px 0;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    font-family: inherit;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 分隔线 */
hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: 600;
}

/* 情感标签样式 */
.sentiment-正面 {
    color: #27ae60;
    font-weight: bold;
}

.sentiment-负面 {
    color: #e74c3c;
    font-weight: bold;
}

.sentiment-中性 {
    color: #f39c12;
    font-weight: bold;
}

/* 按钮样式 */
.clear-btn,
.back-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.clear-btn:hover,
.back-btn:hover {
    background-color: #7f8c8d;
}

.action-buttons {
    margin-top: 20px;
    text-align: center;
}

/* 结果页面样式 */
.result-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.input-text {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
    word-wrap: break-word;
}

.sentiment-result,
.score-result {
    margin: 10px 0;
    font-size: 18px;
}

.sentiment-label,
.score-label {
    font-weight: 600;
    margin-right: 10px;
}

.sentiment-explanation {
    background-color: #fff;
    padding: 15px;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

/* 情感可视化样式 */
.sentiment-bar {
    margin: 20px 0;
}

.bar-container {
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sentiment-negative-bar {
    background-color: #e74c3c;
    transition: width 0.5s ease;
}

.sentiment-neutral-bar {
    background-color: #f39c12;
    transition: width 0.5s ease;
}

.sentiment-positive-bar {
    background-color: #27ae60;
    transition: width 0.5s ease;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 15px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
}